Officially, the Soviet Union had replaced the "irrationality" and "wastefulness" of a market economy with a planned economy organised along a long-term, precise, and scientific framework; in reality, Soviet economics were based on "ad hoc" commandments issued from the centre, often to make short-term targets. In 1928, the first five-year plan was launched, its main focus on boosting heavy industry; it was finished a year ahead of schedule, in 1932. The USSR underwent a massive economic transformation. New mines were opened, new cities like Magnitogorsk constructed, and work on the White Sea-Baltic Canal began. Millions of peasants moved to the cities, although urban house building could not keep up with the demand. Large debts were accrued purchasing foreign-made machinery.