reorganized code in child_arrive_depart controller