restructuring the demo