conformed to conventions from jshint