implemented unique_ptr to PTree