created a for loop to reduce memory output, i also commented out the insane provision of deleteing the data after the loop is written, no idea why we ever did that