bug fix and eliminated unnecessary parentheses