Mod calculation transition to new format