Any insect that flies at night must deal with bat predation. Take a moth, for example. Moths arrived first on the evolutionary stage; when much later on bats appeared with their sophisticated apparatus for echolocating prey, moths were forced to change or die. Some species developed ears to hear the approach of a bat; this generally evokes evasive flight maneuvers like loops and dives. Other species acquired distasteful chemicals that gave them a repugnant or poisonous taste. Some even developed the ability to produce sounds that seem to confuse, and sometimes thwart, an attacking bat.