added basic server and client functionality