feat(_connect): separate connection logic into private method