Insects come from a common ancestor that possessed two pairs of wings. Most insects today still have two pairs of wings used in flight, however some have wings modified through evolution to serve other functions. The hindwings of flies and mosquitoes were modified into small balancers (halteres) that vibrate to maintain stability in flight. The forewings of beetles were modified into hard cases (elytra) for protection. Some insects such as grasshoppers develop wings only at maturity, while others such as female scale insects lose them at maturity. In some insect species, such as ants and some bagworm moths, only mating adults or only one gender has wings (see Alates).