update to index.js to expose lib correctly