read 'densities.dat' file and put the data into a list