add inheritance and overriding update