only reads from socket and prints only to terminal