works also bayes