InvalidArgumentException changed to IllegalArgumentException