update and print confusion matrix