compute the text before the `if` so that you can reuse it in the else block too