move `on('pipe')` to the prototype

I forgot I could do that :)