and delivered him out of all his afflictions, and gave him favour and wisdom before Pharaoh king of Egypt; and he made him governor over Egypt and all his house.