added comments for long functions in api