Updated to pass jshint test