Uses a dictionary instead of a string