add fun: replace, substr, swap