work on generating residue-shifts