extracted idle function
extracted data state