Refinement of prepareSGP