Added replace and remove methods