added invalid argument exception