Added generic version of case 2.