Added confusionmat code