merged logic onto connections