added button functionality to appointments