Current version of the inference function