added test for residue numbers