Some examples in using design patterns