Nmin and Nmax if statements for table check
new index for Nmin and Nmax