modified nTrials simulation 1