changing state of menu item