updated before_action of tasks and sub_tasks and memo