New click function for buttons

still needs some work