sort_dict was not returning anything