fix demo using new code