Completed file from exercise 39