model and tests work on node.js and the browser