add static factory pattern and abstract factory
add static factory pattern and abstract factory