density plot function included