adding proper documentation
adding jshint directive to ignore unused vars
adding tests