Use a tree to represent the path, while it is not satisfying for spiral data