replace `slice` with `cut`