added polymorphism for votes. fixed code to match changes