task main() { if (conditional1(sensor)==2) { if(conditional2(sensor) > 100) { //run bucket commands } else { //move on to next bucket }