implemented server side of SD