i think i fixed the visibility test even better