Iteration through tree working