small cahnges in Appointment function