add designer pattern principle