transposed the result before writing it to the file