correctly modify and add new appointment