put in comments on replacement function.