clean up code in Parentheses puzzle