Multidimentional arrays homework resolved