add initialize for two variables after reallocation