minor optimization.
refactoring.