optimized the files to cache the data after reading and processing