Slight refactoring: