refactor nice number helper into util.js
start unit testing