added support for arbitrary number of input pipes to cogroup