VisibilityExample refactored