increased NMAX to 128