massive changes to isOpen()