fixed main.cc, inmplements vectors instead of arrays