More code for laplace decoding (doesn't work)