added some jsdoc comments