elephant trunk function explained