improve looks_like_logical