handle bad input exception