updated source to fit jsdoc commenting