Tried to sew things together in index.js