private static function validateComp($component, $value, $min, $max)
    {
        if ($value < $min || $value > $max) {
            throw new Exception(
              "{$component} component {$value} must be {$min}-{$max}");
        }
    }