under Andrianampoinimerina. Major public works were carried out under his reign, including the further expansion of irrigated paddy fields in the Betsimitatatra plains surrounding Antananarivo. He devised systems for organizing work teams, motivated their efforts by setting up competitions between teams, and punished those who failed to contribute their due share of effort. He mobilized groups of hiragasy village musicians to entertain work teams and later employed them to travel among towns and villages across the kingdom, broadcasting news, announcing new laws and promoting proper social behavior. Laws Andrianampoinimerina developed a legal system that applied throughout the territories he ruled. He was the first Merina king to establish formal civil and penal codes, the latter ameliorated and transcribed by his son Radama. He declared twelve crimes to be capital offenses, while many others entailed collective punishment for the guilty party and his or her family members including forced labor in chains and being reduced to slave status. These harsh penalties were intended to act as a strong disincentive to engage in antisocial acts; the consumption of alcohol, marijuana and tobacco were also outlawed, although they remained prevalent. To judge infractions of his laws, the king often relied on the tradition of tangena, whereby surviving the ingestion of poison indicated an accused person's innocence. Economy Under Andrianampoinimerina, regulations were established to manage trading in slaves and other commodities. Estimates put the number of slaves traded by the king at around 1,800 per year, mainly in exchange for firearms and principally to French merchants who sold them on to Mauritius and Reunion. This brought order to the kingdom's economy, enriched the crown, and enabled the king to monopolize trade in certain particularly lucrative goods, thereby weakening opportunities for political rivals to amass enough wealth and influence to unseat him. While this soured his relationship with certain andriana, it increased his popularity among the commoner and slave classes. His practice of commonly deciding in favor of commoners in disputes with nobles further strengthened his image as a fair ruler. Andrianampoinimerina regulated commerce and the economy by creating official markets (tsena) and standardizing market scales (fandanjana) and other units of measurement, including length and volume. King Andrianampoinimerina established the first marketplace in Antananarivo on the grounds today occupied by the Analakely market's tile-roofed pavilions, constructed in the 1930s. Andrianampoinimerina decreed Friday (Zoma) as market day, when merchants would come to Analakely to erect stalls