made edit button a toggle