reworked idle function to use bool