modified main loop counter

Changed parameters.numSubject in the main loop