Finally d=2 worked
with histogram 
but slower