- changed function abs to fabs