client and server code changed