adds legacy_uid to hash