change density to get_density