probability compute boilerplate