design pattern sample