format work.js for code review