added a flag for the timer to check if the device is already initialized or not