implemented the edit button