added pipe functionality