extracted duplicated code for voting into interface/abstract class