use std::abs instead of abs