changed connection method