extracted code to Voteable module