finished programming exercise 5