able to pipe 2 processes. Need to make it general purpose