designpattern sample