Updated client server code