Programming the design pattern