added save callback to demo