Inside the history of contested elections