Might be better to cache the visibility first before using it twice.