add some connection code