finished replace_base method
updated docstring