@stof - aah, str_repeat() is new to me too!  This looks much cleaner and easier to read, I will update it.