Bacteria can be classified in several ways, including by their mode of nutrition, temperature and pH requirements, salt tolerance, gas needs, morphology, gram staining, presence of flagella and ability to form spores. Autotrophic bacteria can produce their own food while heterotrophic bacteria rely on organic compounds. Mesophilic bacteria generally grow best around human body temperature, while thermophilic and hyperthermophilic bacteria thrive at higher temperatures. Morphological classifications include cocci, bacilli, spirochetes and others. Gram staining distinguishes between gram positive and gram negative cell walls.