New solution to allow user input simplified code
convert old problems
new problem: 9