removed need for df and added conditional densities