using `replace` instead of `sed`