Tweaked as an exercise: added more detail.