added the Bad_input exception