base case 2 and 4