added isVisible method