Added client and server code