one more example and little refactoring