changed connection functionality