added toggleOpen and setOpen