refactoring, use new_dict_rev instead of bare query