threading using find in batches correctly