MAINT: more manual optimization