One final speed improvement in the likelhood calculation