Working on api,factory.js