The dynamics of War and Revolution