changed click event for all buttons