add restore method and test