make ensureCapacity public