with vectorization