Removed loop to speed up and simplify code -- used 2D list instead