Problem 4 finished