This line is pretty impossible to parse, can you maybe break it into two stages and avoid using + for string concats? % substitution reads much nicer.