Inheriting from a class and overriding it's methods