Added conditions to user input.