added $dxLevel to provide information of how deep in the tree we are.