public function getPaperScoreDistribution(Exercise $exercise, $scoreOn)
    {
        $papers = $this->paperRepository->findBy([
            'exercise' => $exercise,
        ]);

        $scores = $this->getPapersScores($papers, $scoreOn);

        // get unique scores from scores array
        $uniqueScores = array_unique($scores, SORT_NUMERIC);
        sort($uniqueScores);

        $paperScoreDistribution = [];

        foreach ($uniqueScores as $key) {
            $matchingScores = array_filter($scores, function ($score) use ($key) {
                return floatval($score) === floatval($key);
            });

            $paperScoreDistribution[$key] = [
                'yData' => count($matchingScores),
                'xData' => $key,
            ];
        }

        return $paperScoreDistribution;
    }