This cosmology is the foundation of its Samsara theory, that evolved over time the mechanistic details on how the wheel of mundane existence works over the endless cycles of rebirth and redeath.[8] In early Buddhist traditions, Saṃsāra cosmology consisted of five realms through which wheel of existence recycled.[4] This included hells (niraya), hungry ghosts (pretas), animals (tiryak), humans (manushya), and gods (devas, heavenly).[9][8][10] In latter traditions, this list grew to a list of six realms of rebirth, adding demi-gods (asuras).[9][11] The "hungry ghost, heavenly, hellish realms" respectively formulate the ritual, literary and moral spheres of many contemporary Buddhist traditions.[9][8]