Update index.js

Added callback function to start