design pattern implementations