connecting client and server