updated the server to broadcast JSON instead of plain text