Patterns: factory method.