added pqr and residue(s) classes