added probabilistic class with functionality from eclipse