replace tuple by pair