fixing vectorize