vectorized versions