some serious optimization work that brings things in line