FINALLY, DONE: THIS CODE IS PERFECT

this is the one for the data that goes into the paper