faster calculation of accuracies