cleaned up and differential between print_list_dict and print_match