moved all resources to api.js