Added simple code to read from socket