improving output to results.txt