edit button toggles state