added licence and jsdoc