updated to save error rates easily