Continued attempt at generic approach