bump version number
generalizing the saveRestore function