create factories.js