multiclass logic