add class to write results.
add class to write results.