could be levied if needed. Legionaries lacked the opportunity of a military career; they were not paid well, their primary form of income being what they could loot from the battlefield, and were simply called upon when needed and returned to their civilian lives when they were no longer required. In terms of organization and function, the early Republican era military was inherited from the Etruscans and seemingly influenced by the ancient Greek and Macedonian phalanx. After a crushing defeat at the Battle of the Allia, in 387 BC the military structure was reformed. Under the Camillan system the legions were initially structured based on social class, with the poorest being the first line of the formation. The legionaries most often fought with hastae (spears) and scuta (large rectangular shields) in a checkered maniple formation with assistance from skirmishers. The exception to this was the triarii, the final line of the formation who instead fought as hoplites, using Greek clipei and whose wealth could afford them gladii in the case of a broken spear. By the 3rd century BC, this system was seen to be inefficient. Under the new Polybian system the ranks were no longer structured by wealth, and instead by age and experience. All legionaries had their hastae replaced by gladii, along with two pila, which were used as an opening volley before melee. The former classes of poor legionaries, the accensi, rorarii, and leves were replaced by the velites. Unit sizes were also expanded. The formation of the legion once again changed in 107 BC under the Marian reforms due to manpower shortages. Legions were turned from conscripted armies in times of conflict to active, standing forces organized by cohortes as opposed to maniples. All former classes were disbanded and replaced by a main body of legionaries and its officers. Property and wealth qualifications were removed and all legionaries were equipped by the state. Legionaries were now contracted and actively trained and paid career soldiers. Non-citizens or peregrini were also offered a position in the military as auxiliaries. The Republican legion evolved from 3,000 men in the Roman Republic to over 5,200 men in the Roman Empire, consisting of centuries as the basic units. Until the middle of the first century AD, ten cohorts made up a Roman legion. This was later changed to nine cohorts of standard size (with six centuries at 80 men each) with