moving index.js out of lib