got rid of the acuumulator array
refactored printing of results into another method
got rid of the accumulator array
more efficient using StringBuffer for printing out the results; saved 4 seconds