minor refactoring (clean code)