refactor to subclasses