patterns refactoring (part 2/3)