Swapped back to original code with new marg probs