Completed Problem 21, needs documenting