to simplify the implementation and avoid unnecessary conversions from `Option<usize>` to `isize` and back.