add test for saving