renamed api.js to client.js