Complete goal solution: allocates its own string and everything!