finalState added