Added calculate_accuracy