need to trim off extra spaces at the end.
oops, no last when not in loop