The existence of nuclei is due to the predominance of quarks over antiquarks in the early universe. The enormous density of the matter at early times was accompanied by an enormous temperature; the pressure of the hot, dense matter caused it to expand rapidly, cooling adiabatically as it expanded. After the era of primordial nucleosynthesis, the universe continued to expand uneventfully for almost a million years, a mixture of nuclei, electrons, neutrinos, and photons. Gradually, many of the atoms and molecules formed in the big bang clustered together due to the mutual attraction of their gravity. The gravitational attraction causes a star to compress together and heat up, reversing the expansion-cooling cycle of the Big Bang. The force of the explosion scatters the heavy elements into space. All the heavy elements on earth were formed in supernovas; it is estimated that the earth contains portions of the remnants of several thousand different supernovas.