Added getIsVisible() function