more refactoring to remove unneccessary parenthesis around the conditional if statements