added if statement making use of double parenthesis