Comparing dictionaries instead of strings