edit to conform to some jshint requirements