add index.js with our core function