minor refactorizations