Change to submod and mulsubmod for better portability