Feature/factory method

# feature/factory_method

I added factory method function.