use abs() instead of fabs() on integers