Added update to api.js