Updated calculating terms from inference