create onclick listeners for all buttons