Update function validated

- Validated the update function against the old code
- Copied function from Shannon.jl, because the binning was done
slightly different