implemented the rest of voting and ranking