replace and remove