updating lcm