Add in density calculation