Design pattern example