refactored the demo page