Your right. Formatting was the wrong word, I should have said something like, "correct syntax" as it relates to the coding not the formatting.

I am sorry but I don't understand what the script is supposed to do. The understanding issue is probably on my side.