Redefine static arrays to dynamic (remember to allocate memory and free when no longer used) .

Read more about stack and heap.