refactoring using jshint
trivial refactoring using jshint