minor refactoring.
minor refactorings.