Replaced two applies by one loop

You can actually use rawToChar to paste the string together. I store it
in the first line of each column of val