Add remainders functionality