major performance tweak