Implemented 'replace'