the same song responsible for warning competitor males of aggression. Mating and courtship Vocalizations play an important role in the mating behaviour of many animals. In many groups (birds, frogs, crickets, whales etc.), song production is more common in males of the species, and is often used to attract females. Bird song is thought to have evolved through sexual selection. Female songbirds often assess potential mates using song, based on qualities such as high song output, complexity and difficulty of songs, as well as presence of local dialect. Song output serves as a fitness indicator of males, since vocalizations require both energy and time to produce, and thus males capable of producing high song output for long durations may have higher fitness than less vocal males. It is thought that song complexity may serve as an indicator of male fitness by providing an indication of successful brain development despite potential early-life stressors, such as lack of food. Social transmission of songs allows for development of local dialects of song, and female songbirds also typically prefer to choose mates producing local song dialects. One hypothesis for this phenomenon is that selecting local mates allows the female to choose genes specially adapted to suit local conditions. Frog song also plays a prominent role in courtship. In túngara frogs (Engystomops pustulosus), male frogs increase the complexity of their calls, adding additional note types when greater numbers of competitor males are present, which has been found to attract greater numbers of female frogs. Some species change their courtship calls when females are especially nearby. In male glass frogs (Hyalinobatachium fleichmanni), a long frequency-modulated vocalization is produced upon noticing another nearby frog, but is changed to a short chirping song when a female approaches. Several species (e.g. dendrobatid frogs (Mannophryne trinitatis), ornate frogs (Cophixalus ornatus), splendid poison frogs (Dendrobates speciosus)), switch from long-range loud trilling sounds to short-range quieter chirps when females move closer, which is thought to allow mate attraction without alerting competitor males to female locations. Although highly complex song-like production has been identified in whales, the function is still somewhat elusive. It is thought to be involved in courtship behaviour and sexual selection, and singing behaviour becomes more common during the breeding season. Aggression and territorial defense Another major function of song output is to indicate aggression among males during breeding seasons. Both anurans and birds use singing in territorial displays to