added documentation for replace and wrap