so that results output to file is correct