more AI

rearanged order of if's