redesign service layer