add case for multiple classes polymorphism