extract subclass sample code