add N and M in settings