add design pattern sample