Completed exercise 4 of stream adventure.