Challenge 47 refactored to make a framework for 48.
Completed challenge 48.