Added doInference