The second historically-documented Egyptian pyramid is attributed to the architect Imhotep, who planned what Egyptologists believe to be a tomb for the pharaoh Djoser. Imhotep is credited with being the first to conceive the notion of stacking mastabas on top of each other, creating an edifice composed of a number of "steps" that decreased in size towards its apex. The result was the Pyramid of Djoser, which was designed to serve as a gigantic stairway by which the soul of the deceased pharaoh could ascend to the heavens.