refactoring requested by code reviewer