slight refactorings