Slow working (required more testing) copy
Need to fix calculateSingleLikelihood in order to speed it up