modify the method that create class when extends