update index.js, add some prompting