implemented LCM based on GCD
updated TODO