Finished Problem 22
finished problem 22