added jsdoc api documentation