added the api.js file