add underscore.js and use _.isNaN() instead of isNaN()