working version for glauber.