Got log identity wrong for calculating p(S|x).