redo inter-thread communication using pipes