working on logdist