New connection logic