for `index` and `capacity` it i OK to use `ssize_t`