Add code for design pattern.