started replacement function.