Changed from dynamic arrays to vectors due to memory issues
Script and new 1d array sequential implementation