using ``InvalidArgumentException`` would be better