hanged write method to write the results String