implement deletion of segments