updated slave code