modified for new bulk file processing