Revising the procedure of RandomTextWriter