refactor everything into subclasses