Use `slice` instead of `substring`