Leonardo was also valued as an engineer. With the same rational and analytical approach that moved him to represent the human body and to investigate anatomy, Leonardo studied and designed many machines and devices. He drew their “anatomy” with unparalleled mastery, producing the first form of the modern technical drawing, including a perfected “exploded view” technique, to represent internal components. Those studies and projects collected in his codices fill more than 5,000 pages.[146] In a letter of 1482 to the lord of Milan Ludovico il Moro, he wrote that he could create all sorts of machines both for the protection of a city and for siege. When he fled from Milan to Venice in 1499, he found employment as an engineer and devised a system of moveable barricades to protect the city from attack. In 1502, he created a scheme for diverting the flow of the Arno river, a project on which Niccolò Machiavelli also worked.[147][148] He continued to contemplate the canalisation of Lombardy’s plains while in Louis XII’s company[69] and of the Loire and its tributaries in the company of Francis I.[149] Leonardo’s journals include a vast number of inventions, both practical and impractical. They include musical instruments, a mechanical knight, hydraulic pumps, reversible crank mechanisms, finned mortar shells, and a steam cannon.[36][37]