implemented isOpen()