MP: Change loop to recursion
MP: Introduce TraceResult