adding pipe
adding working test case
merging from upstream