Worked on event handler code