Add state tracking