turn into batch processing for large files