Okay so one button now works for updating the dat

data going into the file, but the algorithm is broken somewhere