and He rescued him out of all his tribulations, and He gave him favor and wisdom before Pharaoh king of Egypt, and he appointed him ruler over Egypt and over all his house.