Attaching Event Listener to buttons