some helper code for the demo