added a visible check