exercise on dictionaries, almost complete