fix demo

update demo according to recent changes in API closes #615