Added polymorphism and inheritance