check for visibility state