commit before switching to 1D array and dynamic
alloc