created bayes grid calculator class