finished edit button functionality