replaceContent method switched to private