renamed index.js to api.js
Implement send