removed turnary operator as the function returns true/false