edit and delete matches