added events to js