The market exchange law ("shiyifa"), also called the guild avoidance law ("mianshangfa"), targeted large trading companies and monopolies. A metropolitan market exchange bureau was set up in Kaifeng and 21 market exchange offices in other cities. They were headed by supervisors and office managers who dealt with merchants, merchant guilds, and brokerage houses. These institutions fixed prices for not only resident merchants but also itinerant traders. Surplus commodities were purchased by the government and stored for later sale at a lower price, disrupting price manipulation by merchant monopolies. Merchant guilds that cooperated with the market exchange bureau were allowed to sell goods to the government and buy commodities from government storehouses using money or credit at an interest rate of 10 percent for six months. Small or mid-sized companies and groups of five merchants could provide guarantee with their assets for credit. After 1085, the market exchange bureau and offices became profit making institutions, and bought cheap goods and sold at higher prices. The system stayed in place until the end of the Northern Song dynasty in 1127.