Solution to intermediate challenge 139.