write results for the code