added more tests; make pipe send and receive generalized not complete though