A new formulation of classical electrodynamics