further refactorings to avoid inheritance trees