Refinement of testSGP and updateSGP