added jsdoc comments