added JSDOC for internal functions
added JSDOC for internal functions