converted overlayvisibility to var