added jshint, modified code to succeed jshint