Finished programming exercise 2