Create handleEvent.js