treat tilde and logpdf for gradient (in progress)