In 1781, James Lovell, who designed cipher systems used by several prominent Americans, determined the encryption method that British commanders used to communicate with each other. When a dispatch from Lord Cornwallis in Yorktown, Virginia, to General Henry Clinton in New York was intercepted, Lovell's cryptanalysis enabled Washington to gauge how desperate Cornwallis's situation was and to time his attack on the British lines. Soon after, another decrypt by Lovell provided warning to the French fleet off Yorktown that a British relief expedition was approaching. The French scared off the British flotilla, sealing victory for the Americans.