Make the static array to dymanic array for saving memory.