changes made to connection method