replace and update now working