working on Depth First Order