fixing string concatenation in javascript