refine task and event