Refactored the example.