mostly working except parenthesis