replace abs with std::abs