adding lcm method
finished add method