updated recover func