improved signature of Deferred and added simple test for "pipe"