making isOpen() a boolean