move main code to index.js
0.2.3