updated demo with code example