whoops forgot to add null check for mul_mod