update for new sgp; separate out client