support multiple classes per sample