revamp using single index.js
sync
sync
working test