adding interactivity with events