remove the #define N based on a suggestion by a3nm
Improve optim 1