added comments ad jsdocs