Changed list of dicts to a dict