add WriteStr method