moved terminal section below case 1