fix demo for loading data via function.