refactor to pass jshint for project