adding rv_discrete_factory