match EnterRoot with LeaveRoot