event handling code added