#767 - minor refactoring