fix bug with extractProb and switch to alg2