Merged for-loops at the end of inputData.
Changed the array indices to be 0 instead of 1, all tests pass.