add visibility check