this uses half the `divMod` calls