redo the array when needed