Setting event listener for each button