Created by: ShinanWu
there may be a chance lead to memory corruption if index of "data[index]" is out of bounds