fix syntax (paranthesis balancing)