update Demo and fix issue with session creation and gettin sampling feature by code