Offcourse I forgot the brackets

I made one error in my explanation

the first mux is on AN0 the second one AN1
so in the middle of the for nextloop i need to switch to ADCIN 1

Your single loop for ADCin0 and 1 is not clear to me