add factory_method and factory_method_test