do a better job tracking state