path length for recursive method was still not right