Inplace replace