Completed Problem 16, needs documenting