small refactoring of voting and accepting correct answer