vectorized classification