Is there a better way to generate this string than piecemeal? something from re? I don't see a way w/ format to do conditional components. That is, the if statements below.