refactored to include examples in jshint tests