be more flexible in replace_all