extract service class