Added code to update the state of the digital segments