use InvalidArgumentException rather then Exception