finished Problem 5 code