updating the demo with the new API