moved up the mean diff visit 1 and visit 2 code and made a txt file write of the mean diff.