one more minor refactoring for readability