#358: small refactoring according to Alexander's comments