vectorize within