Changed method name replace_string -> replace_pattern