minor refactoring;