save and update appointments