refactoring for s:find_dict()