density resampled correctly