several more refactorings as starting point for branches