move dict_factory to tv_util