minor refactoring changes