simplified if condition