Added LCA function