documenting helper functions