Legal challenges in elections