#948 minor refactoring following code review