moved index.js to lib