idle() and cond variable at top