add comments to helper functions