parse the file and store data in 2dlist