Changed to return dictionaries, not tuples