same as before, capacity could be `size_t`, but in this context `int` is OK too.