added user input for exercise 5