how is a pyramid made