better code for reprocessing a bunch of data