added restoring to cook script