working on the edit/delete of segments