return the wrapping function from a factory