outline how to calculate densities