CH 1 - changed deep isinstance() utilizing if and for loops.