To cut one main class to three subclass