change from 2d array to LinkedList