added feture to validate casting a vote and methods to count cast votes