Testing to see why t stops at around 1500. Not done yet, but works. More comments are still needed for the file.