Use logsumexp to avoid overflow in probability calculations
undo fixings
new derivations
implement new derivations