added functions calculating probability