add design pattern codes