add doc for helper function