- minor refactoring for clarity