using validator for params
added jshint