move examples to package saveWithFunction