private static Collection<Circle> filterOverlaps(Collection<Circle> input)
    {
        Collection<Circle> output = new ArrayList<>(input.size());

        // for each circle
        for(Circle c1 : input)
        {
            // at first it doesn't have overlaps
            boolean hasOverlaps = false;

            // loop through all the circles
            for(Circle c2 : input)
            {
                // can't compare to itself
                if (c2 != c1)
                {
                    // if the square distance is smaller than the min overlap distance
                    int overlapDistance = (int) Math.pow(Math.min(c1.radius, c2.radius), 2) / 2;

                    if ((Math.pow(c2.x - c1.x, 2) + Math.pow(c2.y - c1.y, 2)) < overlapDistance)
                    {
                        if (c2.score > c1.score) hasOverlaps = true;
                        else if(c2.score == c1.score && c2.hashCode() > c1.hashCode()) hasOverlaps = true;
                    }
                }
            }
            if (!hasOverlaps) output.add(c1);
        }
        return output;
    }