Code for the demo