clean up calculate_probability method, minor update to tests