changed edit button to a toggle