substantial speedup
tiny edit