modify the way realloc, but the stupy bug exits...