Novel transmetalation reaction for electrolyte synthesis for rechargeable magnesium batteries