modified correctness tests
perf modified