preallocate array size instead of growing