added some basic client connection code