swaps out old dynamic string with memory leak for new string, lex has
memory leaks still