better code practices from jshint