finish adding toggle, open and close logic