added isOpen method