added basic qtree functions