don't assume max size, instead allocate how much we need