more vectorization improvements