move densities to separate object