re-adjusted election code