Trial Loop to aggregate the data over all subjects and trials