`hasAnd` is always false as above code. Please rethink what's wrong.