Added functionality for pipelining multiple documents at once