worked on vectorization