use REALLOC_ARRAY for changing the allocation size of arrays