modified managetask_appointment