first draft of index.js