change InvalidArgumentException to IllegalArgumentException