parsing parentheses working