Function isRunTree