refactored delete appt method