fix whitespace issues
add jsdoc