move main source to index.js