merge mg contacts into one when possible