restore parenthesis in repl arithmetic
added repl boolean logic