edited event.js