if (!is_array($config) || count($config) === 0) {
            throw new InvalidArgumentException("No configuration array was supplied"); 
        }