writing strings restructured