passes all tests, fixes, some perf degradation