2900 FOR M=1 TO NG