calculate probability from difficulty
cleanup test