select connection based on version