fixed formatting of output that's sent through the socket