demo function and pickle loading