refactor to new naming for api/service layer