function to parenthesize
more cleanup