add example code
update docs for new demo code