realloc allocates memory at new location, have to assign pointer to new location