saving the density