I don't get why you need three dicts here - it seems like one would suffice just fine.