lazy variant, small refactoring