debug and add index.js