trying to make it perform better with large files