set up service layer.