moved module definition into index.js