minor example refactoring