fix parenthesizing; adjust indentations