more elaborate batch processing