Changing exercise 2 to a basic solution