update logic for exisitng appointments