finished onclick functionality of buttons