updated appointment functions