used log for computeprobabilit