public static function find($name)
    {
        if (empty($name)) {
            throw new \InvalidArgumentException('Cannot lookup country for an empty name');
        }

        if (strlen($name) == 2 || strlen($name) == 3) {
            $upcase_name = strtoupper($name);
            $country_code = new CountryCode($name);
            $country_format = $country_code->getFormat();
            foreach (self::$COUNTRIES as $c) {
                if ($c[$country_format] == $upcase_name) {
                    $country = $c;
                    break;
                }
            }
        } else {
            foreach (self::$COUNTRIES as $c) {
                if ($c['name'] == $name) {
                    $country = $c;
                    break;
                }
            }
        }
        if (!isset($country)) {
            throw new \OutOfRangeException("No country could be found for name {$name}");
        }

        return new Country($country);
    }