got the event listener to work on the button