delete a line and add a new line