Added connection functionality