adds event listener to event buttons