used polymorphism using objects