Can we make this support an arbitrary number of streams? It should be fairly straightforward.