finds best-fit heuristic & counts deviations