Added updateNumberOfTrials