Change in index.js

Inserted alerts to check function calls and events