corrected maxpid calculation such that the minimum number of participants is 1