Genesis 41:35

41:35 They should gather all the excess food during these good years that are coming. By Pharaoh’s authority they should store up grain so the cities will have food, and they should preserve it.

Genesis 50:20

50:20 As for you, you meant to harm me, but God intended it for a good purpose, so he could preserve the lives of many people, as you can see this day.