A simple implementation of Variable Elimination in Bayesian networks for discrete variables