adding isOpen method