Updated 5_function_factory.