check to see if there is a performance improvement that can be made here, and test with bigger file (>1GB)