Adding some connection code