the origianl code cannot array correctly

the original code cannot handle the array correctly