adding ability to get the sequence of state changes