troubleshooting error in calculating accuracy, trying to add visualization