Fixed inferencefunction

The inferencefunction should be working now