add basic LCA with parent pointer