adding stats file to all programs plus some minor updates