Updated result to be returned as a dictionary instead of a tuple