Added code to send data back to the client