client and server code added