During the American Civil War, the Union Army quickly figured out how to play Confederates’ own prejudices against them. They found that many Confederate troops would speak openly about tactics and troop movements or leave maps and orders out in plain view in front of black slaves and servants. So low were the southerners’ opinions of African Americans, they couldn’t imagine them doing anything useful with the information they heard or saw. Reports from runaway slaves and free African Americans from the North that joined the Army as scouts and spies became so invaluable to the Union that they were placed in a special category by intelligence officers: black dispatches.

The most famous of the spies was Harriet Tubman. But two of the more creative providers of black dispatches were a man named Dabney and his wife, who worked with Union troops around Fredericksburg, Virginia in 1863. The runaway slaves had crossed into Union territory earlier that year, and Dabney found employment in General Joseph Hooker’s camp as a cook. His knowledge of the area also made him a great asset, and he was soon advising troops venturing into enemy territory on routes and terrain.

After a few weeks in the camp, Dabney’s wife left for Confederate territory to take a job as a laundress and personal servant to a southern woman. Not long after she left, Dabney began bringing reports about Confederate movements to Hooker. His information proved accurate: he always knew which units were moving, where they were going, how long they’d been on the march, and what numbers they had. He was quick, too, and Hooker found that Dabney’s information usually reached him just hours after it was discussed by rebel commanders on the other side of the lines.

Useful as they were, Dabney’s reports were puzzling. No one ever saw him leave the camp, abandon his duties, or even talk to returning scouts. Some officers decided to figure out where Dabney was getting his intelligence and questioned him at length. Dabney finally gave in and led them to an elevated point in the camp. From that vantage point, they had a clear view of Fredericksburg and much of the surrounding area.

Dabney pointed to a house on the outskirts of the town, along the river bank. Out in its yard, there was a clothesline where clothing and sheets were hung out to dry. He and his wife, Dabney explained, had worked out their own signaling system using the laundry that she hung out to dry for her employer. Whenever she saw troops moving through the area or heard soldiers discussing plans in town, she would rush to the clothesline and hang items in particular ways and sequences—a red shirt to represent Stonewall Jackson, an upside-down pair of pants to signify westward movement—to send Dabney a coded message.

Until Hooker moved his camp, the cook, his wife and the Confederates’ dirty laundry provided him with some of the best intelligence of the campaign.