process one doc at a time