add decorator design pattern code.