Added action listeners to buttons