added factories.js.coffee