Demonstration code: FLAGGED FOR CLEAN-UP