set up threads for communication in both directions. haven't tested it yet