adding support for computing the log-probability
pass testing for computing log probability