added implementation for ParentPointerTree