Revise RRSP algorithm