A model of the auroral electrojets