code refactoring: namespace Math_