code examples of patterns mostly GOF