add logsumexp.