Finished problem 5