added some documentation for helper functions