add lca to rmq