Added match_dictionary function.