modified scala.math to math