added n-mod-m