Add idle function.