updated record_ir to search and replace