added confusion matrix generation