fucking absolute value in heuristic calc