vectorized class determination