added code for majorVote