completed vectorize