udpated to use cors version of SPS.