two design pattern