added root error rate function to track our error rate.