updated demo code examples