fixed seg faults before entering string, still need to fix passing of 2d array...