a small refactoring for clearer example