private function setPercentSize(\Jb\Bundle\TagCloudBundle\Model\Tag $tag, $max)
    {
        $percent = ($tag->getCounter() / $max) * 100;

        $weight = floor($percent / 10);

        if ($percent >= 5) {
            $weight++;
        }

        if ($percent >= 80 && $percent < 100) {
            $weight = 8;
        } elseif ($percent == 100) {
            $weight = 9;
        }

        $tag->setWeight($weight);
    }