further refactorings