returning correct user_input after an invalid value given